#include "Bullet.h"

void Bullet::updateBullet(sf::RenderWindow& wnd)
{
	bulletSpeed = 20;
	sf::Vector2f plrPos = playerPos;
			sf::Vector2i mPos = mPos;
			//Move the bullet
					const float PI = 3.14159265;
					float dxb = mPos.x - plrPos.x;
					float dyb = mPos.y - plrPos.y;
			         float vectorLengthb = sqrt(dxb*dxb + dyb*dyb);

         float DirectionXB = dxb / vectorLengthb;
         float DirectionYB = dyb / vectorLengthb;

		 float VelocityXB = DirectionXB * bulletSpeed;
		 float VelocityYB = DirectionYB * bulletSpeed;
		this->move(VelocityXB, VelocityYB);
\
}